'use strict';

/**
 * #################
 * 兼容处理: 
 * @default performance.now
 * @desc 获取当前的微秒时间戳
 */ 

~function(root){
    const performance = root.performance;

    if (!performance) {
        performance = {};
    }
    if ('function' !== typeof performance.now) {
        const startOffset = Date.now ? Date.now() : +(new Date);

        performance.now = performance.webkitNow || performance.mozNow || performance.msNow || function () {
            return (Date.now ? Date.now() : +(new Date)) - startOffset;
        };
    }
    
}(window);